<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <c:set var="ctx" value="${pageContext.request.contextPath}"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>供应商账号详情</title>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>
<body class="iframeBody">
<div class="Wrapper">
    <div>
        <div>
            <div>
                <form id="formSet1">
                    <div class="fieldset1 tabel_col clearFix">
                        <div class="fieldBox col_50">
                            <div class="label">账号类型</div>
                            <div class="field">
                                <span id="bizTypCdNm" name="bizTypCdNm"></span>
                            </div>
                        </div>
                        <div class="fieldBox col_50">
                            <div class="label">收款方</div>
                            <div class="field">
                                <span id="rcptUnt" name="rcptUnt"></span>
                            </div>
                        </div>
                        <div class="fieldBox col_50">
                            <div class="label">收款账号</div>
                            <div class="field">
                                <span id="accNo" name="accNo"></span>
                            </div>
                        </div>
                        <div class="fieldBox col_50">
                            <div class="label">开户行</div>
                            <div class="field">
                                <span id="bkNm" name="bkNm"></span>
                            </div>
                        </div>
                        <div class="fieldBox col_50">
                            <div class="label">开户行行号</div>
                            <div class="field">
                                <span id="bkNo" name="bkNo"></span>
                            </div>
                        </div>
                        <c:if test="${bizTypCd != 0}">
                            <div class="fieldBox col_50">
                                <div class="label">银行预留手机号</div>
                                <div class="field">
                                    <span id="bkResTel" name="bkResTel"></span>
                                </div>
                            </div>
                            <div class="fieldBox col_50">
                                <div class="label">收款方身份证号</div>
                                <div class="field">
                                    <span id="certNo" name="certNo"></span>
                                </div>
                            </div>
                        </c:if>
                        <div class="fieldBox col_50">
                            <div class="label">联系方式</div>
                            <div class="field">
                                <span id="contTel" name="contTel"></span>
                            </div>
                        </div>
                        <div class="fieldBox col_50">
                            <div class="label">区域</div>
                            <div class="field">
                                <span id="rgnNms" name="rgnNms"></span>
                            </div>
                        </div>
                        <div class="fieldBox col_50">
                            <div class="label">账户用途</div>
                            <div class="field">
                                <span id="purpCdNm" name="purpCdNm"></span>
                            </div>
                        </div>
                        <div class="fieldBox col_100">
                            <div class="label">备注</div>
                            <div class="field">
                                <span id="bkRem" name="bkRem"></span>
                                <input name="bkId" id="bkId" type="hidden" value="${id }">
                            </div>
                        </div>
                        <c:if test="${isFlow==1 }">
                            <div class="fieldBox col_100">
                                <div class="label">挂靠公司</div>
                                <div class="field">
                                    <a href="javascript:showLnkCompDetail()" class="link">
                                        <span id="lnkCompNm" name="lnkCompNm">${lnkCompNm }</span>
                                    </a>
                                    <input name="lnkCompId" id="lnkCompId" type="hidden" value="${compId }">
                                </div>
                            </div>
                        </c:if>
                        <div class="fieldBox col_100">
                            <div class="label">资料</div>
                            <div class="field">
                                <jsp:include page="../../system/sysUlFilesRec/sysUlFileRecListDetail.jsp" flush="true">
                                    <jsp:param name="pkId" value="${id }"/>
                                    <jsp:param name="tabNm" value="PRJ_LNK_COMP_BK_ACC"/>
                                </jsp:include>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>


<script type="text/javascript">
    $(function () {

        var formSet1 = $('#formSet1').ligerForm({
            validate: true
        });

        initData();
    });
    //定义父级调用事件
    frameElement.dialog.onCancel = function () {
        frameElement.dialog.close();
    }

    function initData() {
        var id = $("#bkId").val();
        if (!id) return;
        var _url = '<%=path%>/project/prjLnkCompBkAcc/getById.do';
        $.ajax({
            type: 'get',
            dataType: 'json',
            data: {id: id},
            url: _url,
            success: function (msg) {
                if (msg.success == 1) {
                    setData(msg.data);//设置数据
                } else {
                    $.ligerDialog.SQalert({content: msg.info, SQ_type: "error"});
                }
            }
        });
    }

    //设置页面数据
    function setData(data) {
        var form = liger.get("formSet1");
        $("#rcptUnt").html(data.rcptUnt);
        $("#accNo").html(data.accNo);
        $("#bkNm").html(data.bkNm);
        $("#bkNo").html(data.bkNo);
        $("#bkRem").html(data.bkRem);
        $("#rgnNms").html(data.rgnNms);
        $("#bizTypCdNm").html(data.bizTypCdNm);
        $("#purpCdNm").html(data.purpCdNm);
        $("#contTel").html(data.contTel);
        $("#certNo").html(data.certNo);
        $("#bkResTel").html(data.bkResTel);
    };

    function showLnkCompDetail() {
        var lnkCompId = $("#lnkCompId").val();
        if (StringUtils.isNotEmpty(lnkCompId)) {
            Add_navTab('lnkCompId' + lnkCompId, '挂靠公司详情', '<%=path%>/project/prjlnkcomp/toDetailPage.do?id=' + lnkCompId);
        }
    }

</script>


</body>
</html>
